package com.team2.outpatient_sys.service;

import com.team2.outpatient_sys.pojo.*;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface RegisteredService {
    //挂号
    public boolean add(Registered registered);
    //改变挂号状态，如签到或者已就诊
    public boolean update(Registered registered);
    //查询所有挂号信息
    public List<Registered> findAll();
    //根据id查询挂号信息
    public Registered findById(int id);
    //删除挂号信息
    public boolean delete(int id);
    //查看该病人的挂号信息
    public List<Registered> findByPatientId(int patientId);
    //查看挂该医生的号
    public List<Registered> findByDoctorId(int doctorId);
    //查看该科室的所有挂号信息
    public List<Registered> findByDeptId(int deptId);
    //根据就诊时间查看挂号信息
    public List<Registered> findByClinicTime(String clinicTime);
    //线下挂号
    public boolean offlineAdd(RegisteredOffline registeredOffline);
    //查询待签到病人
    public List<Registered> findSign(String clinicTime,Integer currentPage, Integer pageSize);
    //查看用户挂号信息
    public Registered findByUserId(Long userId);
    //修改挂号状态
    public void updateByPatentTime(Registered registered);
    //查看挂号详细信息
    public List<RegisteredDetailed> findRegisteredDetailed(Integer currentPage, Integer pageSize);
    //挂号过期
    public boolean overdue(String clinicTime);
    //查询排班
    public List<DoctorAndAppointment> findDoctorAndAppointment(Integer deptId, Integer week);
    //查看当天排班医生
    public List<Doctor> findDoctor(Integer week,Integer deptId);
    //查看医生班期
    public List<DoctorShift> findDoctorShift(Integer week,Integer deptId,Integer doctorId);
    //挂号成功剩余数减1
    public boolean registeredSuccess(Integer doctorId,Integer scheduleId);
}
